<h1>Lista de Den&uacutencias</h1>


<?php 
	require_once($_SERVER['DOCUMENT_ROOT'] . '/Prototipo/controle/DenunciasController.php');
	require_once($_SERVER['DOCUMENT_ROOT'] . '/Prototipo/modelo/Denuncia.php');
	require_once($_SERVER['DOCUMENT_ROOT'] . '/Prototipo/modelo/Usuario.php');
	$control = new DenunciasController();
	$denuncias = $control->listarDenunciasPendentes();
?>


<table class="table table-striped table-hover">
	<thead>
		<tr>
			<th>Data e Hora</th>
			<th>Usuário</th>
			<th>Email</th>
			<th>Descri&ccedil&atildeo</th>
			
			<th>Rua</th>
			<th>Bairro</th>
			<th>Cidade</th>
			
		</tr>
	</thead>
	<tbody>
		<?php 
			 	while($row = mysql_fetch_array($denuncias)){

				$id=$row['id_denuncia'];
				?>
			 	
			 	<tr>
			 		<td><?php echo $row['data_hora'];?></td>
			 		<td><?php echo $row[18];?></td>
			 		<td><?php echo $row['email'];?></td>
			 		<td><?php echo $row['descricao'];?></td>
			 		<td><?php echo $row['logradouro'];?></td>
			 		<td><?php echo $row['bairro'];?></td>
			 		<td><?php echo $row['cidade_id'];?></td>
			 		<td><?php echo "<a href='index.php?pg=detalhes-den&id=$id'>Detalhes</a>";?></td>
			 	</tr>
			 		
			<?php 		
				}		
			?>
	</tbody>
</table>